#include <stdio.h>
int removeDuplicates(int* nums, int numsSize) 
{
    int i=0;
    int j=1;
    int count=1;
    while(j<numsSize)
    {
        if(nums[j]==nums[i])
        {
           j++;
        }
        else
        {
            i++;
            nums[i]=nums[j];
            j++;
            count++;
        }
    }
    return count;
}
int main()
{
    int nums[]={0,0,1,1,1,2,2,3,3,4,4};
    int ret=removeDuplicates(nums,10);
    printf("%d\n",ret);
    return 0;
}